<?php include '../public/header.php' ?>
<?php include '../public/header_index.php' ?>
<body class="laytp-container">
<div id="opt_nav">
</div>

<div class="layui-card" id="search-form">
    <div class="layui-card-body">
        <form class="layui-form" id="TableSearchFormId" lay-filter="TableSearchForm" onkeydown="keyTableSearch('TableSearchForm', 'datalist')">
            <div class="layui-form-item">
                <div class="layui-row">
                    <div class="layui-col-md3">
                        <label class="layui-form-label">工资月份</label>
                        <div class="layui-input-block">
                            <input type="text" readonly name="month" placeholder="请输入" autocomplete="off" class="layui-input bdate_sea_range_ym">
                        </div>
                    </div>
                    <div class="layui-col-md3">
                        <label class="layui-form-label">姓名</label>
                        <div class="layui-input-block">
                            <input type="text" name="name" placeholder="请输入" class="layui-input" autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-col-md3">
                        <label class="layui-form-label">部门</label>
                        <div class="layui-input-block">
                            <input type="text" name="deptname" placeholder="请输入" class="layui-input" autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-col-md3 search_hide none">
                        <label class="layui-form-label">岗位</label>
                        <div class="layui-input-block">
                            <input type="text" name="gangname" placeholder="请输入" class="layui-input" autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-col-md3">
                        <div class="layui-form-item search-div">
                            <div class="layui-form-item layui-inline">
                                <button class="laytp-btn laytp-btn-md laytp-btn-primary" id="TableSearchButton" type="button"><i class="layui-icon layui-icon-search"></i>查询</button>
                                <button class="layui-btn layui-btn-primary" onclick="listTableReset()" id="TableSearchReset" type="reset" ><i class="layui-icon layui-icon-refresh"></i>重置</button>
                                <div id="search_open" onclick="toggle_search()">
                                    <i class="layui-icon layui-icon-down"></i>展开
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

<div class="layui-card" id="table-card">
    <div class="layui-card-body">
        <div class="layui-row">
            <div class="layui-col-md12" id="table_list">
                <div class="layui-card-body">
                    <table id="datalist" lay-filter="datalist"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="test-dropdown-toolbar-barDemo">
    <div class="tab-list-authbut">
        <a href="javascript:;" class="bar_opt" onclick="auth_but_func_show('查看','{{d.LAY_TABLE_INDEX}}')">查看</a>
    </div>
</script>
<script type="text/html" id="toolbarDemo">
    <div class = "layui-btn-container">
<!--        <button class="layui-btn layui-btn-primary outbut" onclick="auth_but_func_fan('返款登记')">返款登记</button>-->
    </div>
</script>
<script>

    layui.use(["laytp",'laypage','table','dropdown','form','soulTable'], function () {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable;


        $('#TableSearchReset').click(function () {
            $('.xmselect_div>xm-select').find('.xm-label-block').css('display','none');
            $('.xmselect_div').append('<div class="xmselect_title">请选择</div>');
            searchTableFunc(form, table)
        });

        setSouTableExport('工资明细');
        var mytable = table.render({
            elem: "#datalist",id: "datalist"
            ,url: facade.url(ask_wagyuan_detail),where: {}, page: true, height: 'full-140'
            ,soulSort: TabInit.soulSort,method: TabInit.method, toolbar: TabInit.toolbar, overflow: TabInit.overflow
            ,defaultToolbar: TabInit.defaultToolbar,filter: TabInit.filter
            ,request: TabInit.request,response: TabInit.response,contextmenu:get_table_contextmenu(soulTable)
            ,text: TabInit.text,totalRow: true
            ,parseData: function (res) {

                render_from();
                return {
                    "code": res.code,
                    "msg": res.message,
                    "count": res.data.data.total,
                    "data": res.data.data.data
                };
            }
            , cols: [[
                {type: "checkbox", fixed: 'left'}
                ,{type:'numbers',title:'序号',totalRowText: '合计',fixed:'left'}
                ,{field: 'month', title: '月份'}
                ,{field: 'name', title: '姓名'}
                ,{field: 'deptname', title: '部门'}
                ,{field: 'gangname', title: '岗位'}
                ,{field: 'zhuang', title: '状态'}
                ,{field: 'rudt', title: '入职时间'}
                ,{field: 'yingday', title: '应出勤天数'}
                ,{field: 'shiday', title: '实际出勤天数'}
                ,{field: 'dayrate', title: '出勤率'}
                ,{field: 'siage', title: '司龄'}

                ,{field:'jibenshi',title:'基本工资',totalRow: true,templet: function(d){return parseFormatNum(d.jibenshi);}}
                ,{field:'gangshi',title:'岗位绩效',totalRow: true,templet: function(d){return parseFormatNum(d.gangshi);}}
                ,{field:'guanshi',title:'管理绩效',totalRow: true,templet: function(d){return parseFormatNum(d.guanshi);}}
                ,{field:'xinshi',title:'薪资标准实发',totalRow: true,templet: function(d){return parseFormatNum(d.xinshi);}}

                ,{field:'sibushi',title:'司龄补贴',totalRow: true,templet: function(d){return parseFormatNum(d.sibushi);}}
                ,{field:'zhushi',title:'住房补贴',totalRow: true,templet: function(d){return parseFormatNum(d.zhushi);}}
                ,{field:'xueshi',title:'学历补贴',totalRow: true,templet: function(d){return parseFormatNum(d.xueshi);}}
                ,{field:'renbu',title:'人员证书补贴',totalRow: true,templet: function(d){return parseFormatNum(d.renbu);}}
                ,{field:'canshi',title:'餐费补贴',totalRow: true,templet: function(d){return parseFormatNum(d.canshi);}}
                ,{field:'fabu',title:'法定代表人补贴',totalRow: true,templet: function(d){return parseFormatNum(d.fabu);}}
                ,{field:'quanbu',title:'全勤补贴',totalRow: true,templet: function(d){return parseFormatNum(d.quanbu);}}
                ,{field:'jiang',title:'奖金',totalRow: true,templet: function(d){return parseFormatNum(d.jiang);}}
                ,{field:'yingfee',title:'应发小计',totalRow: true,templet: function(d){return parseFormatNum(d.yingfee);}}
                ,{field:'lou',title:'漏签',totalRow: true,templet: function(d){return parseFormatNum(d.lou);}}
                ,{field:'chi',title:'迟到',totalRow: true,templet: function(d){return parseFormatNum(d.chi);}}
                ,{field:'kuang',title:'旷工',totalRow: true,templet: function(d){return parseFormatNum(d.kuang);}}
                ,{field:'qikou',title:'其他',totalRow: true,templet: function(d){return parseFormatNum(d.qikou);}}
                ,{field:'koufee',title:'扣除小计',totalRow: true,templet: function(d){return parseFormatNum(d.koufee);}}
                ,{field:'yang',title:'养老',totalRow: true,templet: function(d){return parseFormatNum(d.yang);}}
                ,{field:'liao',title:'医疗',totalRow: true,templet: function(d){return parseFormatNum(d.liao);}}
                ,{field:'shi',title:'失业',totalRow: true,templet: function(d){return parseFormatNum(d.shi);}}
                ,{field:'geshui',title:'个税',totalRow: true,templet: function(d){return parseFormatNum(d.geshui);}}
                ,{field:'zhuankou',title:'专项扣除小计',totalRow: true,templet: function(d){return parseFormatNum(d.zhuankou);}}
                ,{field:'gekou',title:'个人工资合计',totalRow: true,templet: function(d){return parseFormatNum(d.gekou);}}
                ,{field:'shanbu',title:'赡养补贴',totalRow: true,templet: function(d){return parseFormatNum(d.shanbu);}}
                ,{field:'yangbu',title:'抚养补贴',totalRow: true,templet: function(d){return parseFormatNum(d.yangbu);}}
                ,{field:'jiaobu',title:'教育补贴',totalRow: true,templet: function(d){return parseFormatNum(d.jiaobu);}}
                ,{field:'money',title:'实发工资合计',totalRow: true,templet: function(d){return parseFormatNum(d.money);}}
                ,{field: 'explain', title: '备注'}
            ]]
            , done: function (res) {
                soulTable.render(this);
            }
        });


        listTableSearch(form, table);
    });



</script>
</body>
</html>
